package com.juicygames.framework.property;

import com.juicygames.framework.gamepart.GamePart;

public abstract class IntegerProperty extends GamePart implements GameProperty<Integer> {
	
	private Integer value;
	
	public IntegerProperty(GamePart parent) {
		super(parent);
		this.value = 0;
	}
	
	public IntegerProperty(GamePart parent, Integer value) {
		super(parent);
		this.value = value;
	}
	
	public Integer get() {
		return value;
	}
	
	public IntegerProperty set(int value) {
		this.value = value;
		return this;
	}
	
	public IntegerProperty set(Integer value) {
		this.value = value;
		return this;
	}
	
	public IntegerProperty set(float value) {
		set((int)value);
		return this;
	}

}
